package 代理模式;

/**
 * 代理类
 */
public class DBQueryProxy implements IDBQuery{
    private DBQuery query= null;
    @Override
    public String request() {
        if(query==null){
            query= new DBQuery();
        }
        return query.request();
    }




    public static void main(String [] args){
        IDBQuery idbQuery = new DBQueryProxy();
        System.out.println(idbQuery.request());
    }
}
